﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.SessionState;
using System.Collections.Generic;
using System.Data.Common;
using System.Xml;

using DnCtnPubBas;

/// <summary>
///Main 的摘要说明
/// </summary>
public class Main : IHttpHandler, IRequiresSessionState
{
    private string m_responseText = string.Empty;
	public Main()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    //处理程序是否共享
    public bool IsReusable
    {
        get
        {
            return false;
        }
    }
    public void ProcessRequest(HttpContext context)
    {
        try
        {
            string strMethod = context.Request["_method"];
            switch (strMethod)
            {
                #region SYS 系统
                #region Login 登陆
                case "SYS_Login":
                    {
                    } break;
                #endregion
                #region GetFunc 获取功能点
                case "SYS_GetFunc":
                    {

                    } break;
                #endregion
                #endregion
                #region TEST 测试
                #region ListCtrl
                case "TEST_ListCtrl":
                    {
                    } break;
                case "TEST_TreeCtrl":
                    {
                    } break;
                #endregion
                #endregion
                default:
                    {
                        throw new CCtnErrProc("请求方法有误!");
                    }
            }
        }
        catch (CCtnErrProc err)
        {
            m_responseText = err.GetXmlDoc().OuterXml;
        }
        catch (Exception e)
        {
            m_responseText = new CCtnErrProc(e).GetXmlDoc().OuterXml;
        }
        finally
        {
            context.Response.Clear();
            context.Response.Write(m_responseText);
        }
    }
}
